package com.hsogoo.avatar.serialization;

import java.io.IOException;

/**
 * @Author huangsaigang
 * Created @2018/9/25.
 */
public interface Serializer {

    byte[] encode(Object msg) throws IOException;

    <T> T decode(byte[] buf, Class<T> type) throws IOException;

}
